package com.lgy.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

@Entity
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class Config {

    @Id
    // 声明一个策略通用生成器，name为"system-uuid", 策略strategy为"uuid"
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
    // 用generator属性指定要使用的策略生成器
    @GeneratedValue(generator = "system-uuid")
    private String id;

    private String url;
}
